type IFormType = 'input' | 'password' | 'select' | 'datePicker';
interface ISelectOptions {
  title: string;
  value: string | number;
}

// 传入的每个需要被遍历的item
export interface IFormItems {
  type: IFormType;
  field: string;
  label: string;
  rules?: any[];
  placeholder?: any;
  // 针对select的option
  options?: ISelectOptions[];
  // 其他额外选项, 符合标签属性的键值对的属性
  otherOptions?: any;
  isHidden?: boolean;
}

// 只要传一个props给form组件的formConfig, 最后通过v-bind自动绑定上对象的所有键值对
export interface IFormConfig {
  ElFormItems: IFormItems[];
  ElFormLabelWidth?: string;
  ElFormSize?: string;
  ElFormItemStyle?: any;
  ElColLayout?: any;
}
